{def $root_node=fetch( content, node, hash( node_id, $module_result.path[1].node_id ) )
	$submenu=fetch( content, list, hash( parent_node_id, $module_result.path[1].node_id,
	sort_by, $root_node.sort_array,
	class_filter_type, include,
	class_filter_array, ezini( 'MenuContentSettings', 'LeftIdentifierList', 'nxtri.ini' )))
	$submenu_childs = array()
	$has_childs = ''
	$selected = ''
	$first_class = 'first'
	$selected_child = ''
}
{*,
*}
<div class="submenu" id="submenu"> 
	<h3 class="filled"><span>{$module_result.path[1].text}</span></h3>
	<ul>
		{foreach $submenu as $submenu_node}
			{set selected=eq( $module_result.path[2].node_id, $submenu_node.node_id )
				$submenu_childs=fetch( content, list, hash( parent_node_id, $submenu_node.node_id,
					sort_by, $submenu_node.sort_array,
					class_filter_type, include,
					class_filter_array, ezini( 'MenuContentSettings', 'LeftIdentifierList', 'nxtri.ini' )) ) 
				$has_childs = count($submenu_childs)|gt(0)}
		<li class="{$first_class} {$selected|choose( '', 'selected' )}{$has_childs|choose( '', ' has_childs' )}">
				{undef $first_class}
				{if eq( $submenu_node.object.content_class.identifier, "link" )}
			<a href={$submenu_node.data_map.location.content|ezurl} target="_blank">{$submenu_node.object.name|wash}</a>
				{else}
			<a href={$submenu_node.url_alias|ezurl}>{$submenu_node.name|wash}</a>
				{/if}
				
				{if and($has_childs, eq( $module_result.path[2].node_id, $submenu_node.node_id ))}
				<ul>
					{foreach $submenu_childs as $submenu_child}
						{set selected_child=eq( $module_result.path[3].node_id, $submenu_child.node_id )}
					<li {$selected_child|choose( '', 'class="selected"' )}>
							{if eq( $submenu_child.object.content_class.identifier, "link" )}
						<a href={$submenu_child.data_map.location.content|ezurl} target="_blank">{$submenu_child.object.name|wash}</a>
							{else}
						<a href={$submenu_child.url_alias|ezurl}>{$submenu_child.name|wash}</a>
							{/if}
					</li>
					{/foreach}
				</ul>
				{/if}
		</li>
		{/foreach}
    </ul>
</div>
{undef}
